
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>ArticutAPI Reference</title>
    <link href="images/favicon-e95f49ea.png" rel="icon" type="image/png" />

    <style media="screen">
      .highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight .gh {
  color: #999999;
}
.highlight .sr {
  color: #f6aa11;
}
.highlight .go {
  color: #888888;
}
.highlight .gp {
  color: #555555;
}
.highlight .gs {
}
.highlight .gu {
  color: #aaaaaa;
}
.highlight .nb {
  color: #f6aa11;
}
.highlight .cm {
  color: #75715e;
}
.highlight .cp {
  color: #75715e;
}
.highlight .c1 {
  color: #75715e;
}
.highlight .cs {
  color: #75715e;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf {
  color: #75715e;
}
.highlight .err {
  color: #960050;
}
.highlight .gr {
  color: #960050;
}
.highlight .gt {
  color: #960050;
}
.highlight .gd {
  color: #49483e;
}
.highlight .gi {
  color: #49483e;
}
.highlight .ge {
  color: #49483e;
}
.highlight .kc {
  color: #66d9ef;
}
.highlight .kd {
  color: #66d9ef;
}
.highlight .kr {
  color: #66d9ef;
}
.highlight .no {
  color: #66d9ef;
}
.highlight .kt {
  color: #66d9ef;
}
.highlight .mf {
  color: #ae81ff;
}
.highlight .mh {
  color: #ae81ff;
}
.highlight .il {
  color: #ae81ff;
}
.highlight .mi {
  color: #ae81ff;
}
.highlight .mo {
  color: #ae81ff;
}
.highlight .m, .highlight .mb, .highlight .mx {
  color: #ae81ff;
}
.highlight .sc {
  color: #ae81ff;
}
.highlight .se {
  color: #ae81ff;
}
.highlight .ss {
  color: #ae81ff;
}
.highlight .sd {
  color: #e6db74;
}
.highlight .s2 {
  color: #e6db74;
}
.highlight .sb {
  color: #e6db74;
}
.highlight .sh {
  color: #e6db74;
}
.highlight .si {
  color: #e6db74;
}
.highlight .sx {
  color: #e6db74;
}
.highlight .s1 {
  color: #e6db74;
}
.highlight .s, .highlight .sa, .highlight .dl {
  color: #e6db74;
}
.highlight .na {
  color: #a6e22e;
}
.highlight .nc {
  color: #a6e22e;
}
.highlight .nd {
  color: #a6e22e;
}
.highlight .ne {
  color: #a6e22e;
}
.highlight .nf, .highlight .fm {
  color: #a6e22e;
}
.highlight .vc {
  color: #ffffff;
}
.highlight .nn {
  color: #ffffff;
}
.highlight .ni {
  color: #ffffff;
}
.highlight .bp {
  color: #ffffff;
}
.highlight .vg {
  color: #ffffff;
}
.highlight .vi {
  color: #ffffff;
}
.highlight .nv, .highlight .vm {
  color: #ffffff;
}
.highlight .w {
  color: #ffffff;
}
.highlight {
  color: #ffffff;
}
.highlight .n, .highlight .py, .highlight .nx {
  color: #ffffff;
}
.highlight .nl {
  color: #f92672;
}
.highlight .ow {
  color: #f92672;
}
.highlight .nt {
  color: #f92672;
}
.highlight .k, .highlight .kv {
  color: #f92672;
}
.highlight .kn {
  color: #f92672;
}
.highlight .kp {
  color: #f92672;
}
.highlight .o {
  color: #f92672;
}
    </style>
    <style media="print">
      * {
        -webkit-transition:none!important;
        transition:none!important;
      }
      .highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight, .highlight .w {
  color: #586e75;
}
.highlight .err {
  color: #002b36;
  background-color: #dc322f;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs {
  color: #657b83;
}
.highlight .cp {
  color: #b58900;
}
.highlight .nt {
  color: #b58900;
}
.highlight .o, .highlight .ow {
  color: #93a1a1;
}
.highlight .p, .highlight .pi {
  color: #93a1a1;
}
.highlight .gi {
  color: #859900;
}
.highlight .gd {
  color: #dc322f;
}
.highlight .gh {
  color: #268bd2;
  background-color: #002b36;
  font-weight: bold;
}
.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
  color: #6c71c4;
}
.highlight .kc {
  color: #cb4b16;
}
.highlight .kt {
  color: #cb4b16;
}
.highlight .kd {
  color: #cb4b16;
}
.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
  color: #859900;
}
.highlight .sr {
  color: #2aa198;
}
.highlight .si {
  color: #d33682;
}
.highlight .se {
  color: #d33682;
}
.highlight .nn {
  color: #b58900;
}
.highlight .nc {
  color: #b58900;
}
.highlight .no {
  color: #b58900;
}
.highlight .na {
  color: #268bd2;
}
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
  color: #859900;
}
.highlight .ss {
  color: #859900;
}
    </style>
    <link href="stylesheets/screen-00faecad.css" rel="stylesheet" media="screen" />
    <link href="stylesheets/print-68c56d0f.css" rel="stylesheet" media="print" />
      <script src="javascripts/all_nosearch-ec00d1ce.js"></script>

    <script>
      $(function() { setupCodeCopy(); });
    </script>
  </head>

  <body class="index" data-languages="[&quot;python&quot;]">
    <a href="#" id="nav-button">
      <span>
        NAV
        <img src="images/navbar-cad8cdcb.png" alt="" />
      </span>
    </a>
    <div class="toc-wrapper">
      <img src="images/logo-e4b85fef.png" class="logo" alt="" />
        <div class="lang-selector">
              <a href="#" data-language-name="python">Python</a>
        </div>
      <ul id="toc" class="toc-list-h1">
          <li>
            <a href="#7491807b37" class="toc-h1 toc-link" data-title="ArticutAPI">ArticutAPI</a>
              <ul class="toc-list-h2">
                  <li>
                    <a href="#c387642405" class="toc-h2 toc-link" data-title="Articut">Articut</a>
                  </li>
                  <li>
                    <a href="#285fc1a1cf" class="toc-h2 toc-link" data-title="parse">parse</a>
                  </li>
                  <li>
                    <a href="#24109ec8ea" class="toc-h2 toc-link" data-title="versions">versions</a>
                  </li>
                  <li>
                    <a href="#731ddbecd8" class="toc-h2 toc-link" data-title="getPersonLIST">getPersonLIST</a>
                  </li>
                  <li>
                    <a href="#e724744c53" class="toc-h2 toc-link" data-title="getContentWordLIST">getContentWordLIST</a>
                  </li>
                  <li>
                    <a href="#39d54ca287" class="toc-h2 toc-link" data-title="getVerbStemLIST">getVerbStemLIST</a>
                  </li>
                  <li>
                    <a href="#20dfc0da58" class="toc-h2 toc-link" data-title="getNounStemLIST">getNounStemLIST</a>
                  </li>
                  <li>
                    <a href="#df44f15066" class="toc-h2 toc-link" data-title="getTimeLIST">getTimeLIST</a>
                  </li>
                  <li>
                    <a href="#d1b7478ebf" class="toc-h2 toc-link" data-title="getLocationStemLIST">getLocationStemLIST</a>
                  </li>
                  <li>
                    <a href="#e44c8708ad" class="toc-h2 toc-link" data-title="getOpenDataPlaceLIST">getOpenDataPlaceLIST</a>
                  </li>
                  <li>
                    <a href="#62c7106676" class="toc-h2 toc-link" data-title="getQuestionLIST">getQuestionLIST</a>
                  </li>
                  <li>
                    <a href="#8cdcb0ad5f" class="toc-h2 toc-link" data-title="getAddTWLIST">getAddTWLIST</a>
                  </li>
                  <li>
                    <a href="#0810c6f202" class="toc-h2 toc-link" data-title="getCurrencyLIST">getCurrencyLIST</a>
                  </li>
                  <li>
                    <a href="#9ca302438b" class="toc-h2 toc-link" data-title="getWikiDataLIST">getWikiDataLIST</a>
                  </li>
                  <li>
                    <a href="#7deccb0683" class="toc-h2 toc-link" data-title="graphQL">graphQL</a>
                  </li>
              </ul>
          </li>
          <li>
            <a href="#8031f9d08c" class="toc-h1 toc-link" data-title="MP_ArticutAPI">MP_ArticutAPI</a>
              <ul class="toc-list-h2">
                  <li>
                    <a href="#c47653a06f" class="toc-h2 toc-link" data-title="MP_Articut">MP_Articut</a>
                  </li>
                  <li>
                    <a href="#6e0923bef9" class="toc-h2 toc-link" data-title="parse">parse</a>
                  </li>
                  <li>
                    <a href="#61a46a5471" class="toc-h2 toc-link" data-title="bulk_parse">bulk_parse</a>
                  </li>
                  <li>
                    <a href="#573b2a4254" class="toc-h2 toc-link" data-title="mergeBulkResult">mergeBulkResult</a>
                  </li>
                  <li>
                    <a href="#c005725d6c" class="toc-h2 toc-link" data-title="version">version</a>
                  </li>
                  <li>
                    <a href="#27b69f331b" class="toc-h2 toc-link" data-title="getPersonLIST">getPersonLIST</a>
                  </li>
                  <li>
                    <a href="#5e39797142" class="toc-h2 toc-link" data-title="getContentWordLIST">getContentWordLIST</a>
                  </li>
                  <li>
                    <a href="#dca48e7304" class="toc-h2 toc-link" data-title="getVerbStemLIST">getVerbStemLIST</a>
                  </li>
                  <li>
                    <a href="#1b38f2f1b0" class="toc-h2 toc-link" data-title="getNounStemLIST">getNounStemLIST</a>
                  </li>
                  <li>
                    <a href="#9c01b9f0da" class="toc-h2 toc-link" data-title="getTimeLIST">getTimeLIST</a>
                  </li>
                  <li>
                    <a href="#d3565b71de" class="toc-h2 toc-link" data-title="getLocationStemLIST">getLocationStemLIST</a>
                  </li>
                  <li>
                    <a href="#08225fd4a4" class="toc-h2 toc-link" data-title="getOpenDataPlaceLIST">getOpenDataPlaceLIST</a>
                  </li>
                  <li>
                    <a href="#0f2c76b862" class="toc-h2 toc-link" data-title="getQuestionLIST">getQuestionLIST</a>
                  </li>
                  <li>
                    <a href="#707b413d51" class="toc-h2 toc-link" data-title="getAddTWLIST">getAddTWLIST</a>
                  </li>
                  <li>
                    <a href="#1d4c6cce67" class="toc-h2 toc-link" data-title="getCurrencyLIST">getCurrencyLIST</a>
                  </li>
                  <li>
                    <a href="#b4865d0fa1" class="toc-h2 toc-link" data-title="getWikiDataLIST">getWikiDataLIST</a>
                  </li>
                  <li>
                    <a href="#4354923e3f" class="toc-h2 toc-link" data-title="bulk_getPersonLIST">bulk_getPersonLIST</a>
                  </li>
                  <li>
                    <a href="#9bb3555d98" class="toc-h2 toc-link" data-title="bulk_getContentWordLIST">bulk_getContentWordLIST</a>
                  </li>
                  <li>
                    <a href="#f149f3f437" class="toc-h2 toc-link" data-title="bulk_getVerbStemLIST">bulk_getVerbStemLIST</a>
                  </li>
                  <li>
                    <a href="#a9b0e3b401" class="toc-h2 toc-link" data-title="bulk_getNounStemLIST">bulk_getNounStemLIST</a>
                  </li>
                  <li>
                    <a href="#cb9c49869d" class="toc-h2 toc-link" data-title="bulk_getTimeLIST">bulk_getTimeLIST</a>
                  </li>
                  <li>
                    <a href="#7e0ebbef3e" class="toc-h2 toc-link" data-title="bulk_getLocationStemLIST">bulk_getLocationStemLIST</a>
                  </li>
                  <li>
                    <a href="#0223e31c79" class="toc-h2 toc-link" data-title="bulk_getOpenDataPlaceLIST">bulk_getOpenDataPlaceLIST</a>
                  </li>
                  <li>
                    <a href="#5edd050642" class="toc-h2 toc-link" data-title="bulk_getQuestionLIST">bulk_getQuestionLIST</a>
                  </li>
                  <li>
                    <a href="#2f92751807" class="toc-h2 toc-link" data-title="bulk_getAddTWLIST">bulk_getAddTWLIST</a>
                  </li>
                  <li>
                    <a href="#5c65d343db" class="toc-h2 toc-link" data-title="bulk_getCurrencyLIST">bulk_getCurrencyLIST</a>
                  </li>
                  <li>
                    <a href="#3e4a9505fe" class="toc-h2 toc-link" data-title="bulk_getWikiDataLIST">bulk_getWikiDataLIST</a>
                  </li>
              </ul>
          </li>
          <li>
            <a href="#f824f41126" class="toc-h1 toc-link" data-title="WS_ArticutAPI">WS_ArticutAPI</a>
              <ul class="toc-list-h2">
                  <li>
                    <a href="#31b2a7d248" class="toc-h2 toc-link" data-title="WS_Articut">WS_Articut</a>
                  </li>
                  <li>
                    <a href="#820c35b4c0" class="toc-h2 toc-link" data-title="parse">parse</a>
                  </li>
                  <li>
                    <a href="#ea520a2328" class="toc-h2 toc-link" data-title="bulk_parse">bulk_parse</a>
                  </li>
                  <li>
                    <a href="#bd9787d8ce" class="toc-h2 toc-link" data-title="mergeBulkResult">mergeBulkResult</a>
                  </li>
                  <li>
                    <a href="#7272c57ce6" class="toc-h2 toc-link" data-title="version">version</a>
                  </li>
                  <li>
                    <a href="#7a736ec860" class="toc-h2 toc-link" data-title="getPersonLIST">getPersonLIST</a>
                  </li>
                  <li>
                    <a href="#6a4879c924" class="toc-h2 toc-link" data-title="getContentWordLIST">getContentWordLIST</a>
                  </li>
                  <li>
                    <a href="#bcba9138c3" class="toc-h2 toc-link" data-title="getVerbStemLIST">getVerbStemLIST</a>
                  </li>
                  <li>
                    <a href="#79266817be" class="toc-h2 toc-link" data-title="getNounStemLIST">getNounStemLIST</a>
                  </li>
                  <li>
                    <a href="#fa17c13226" class="toc-h2 toc-link" data-title="getTimeLIST">getTimeLIST</a>
                  </li>
                  <li>
                    <a href="#48cd6f5486" class="toc-h2 toc-link" data-title="getLocationStemLIST">getLocationStemLIST</a>
                  </li>
                  <li>
                    <a href="#4304a37e28" class="toc-h2 toc-link" data-title="getOpenDataPlaceLIST">getOpenDataPlaceLIST</a>
                  </li>
                  <li>
                    <a href="#5e77244622" class="toc-h2 toc-link" data-title="getQuestionLIST">getQuestionLIST</a>
                  </li>
                  <li>
                    <a href="#eefb8d374d" class="toc-h2 toc-link" data-title="getAddTWLIST">getAddTWLIST</a>
                  </li>
                  <li>
                    <a href="#b5f9831e9b" class="toc-h2 toc-link" data-title="getCurrencyLIST">getCurrencyLIST</a>
                  </li>
                  <li>
                    <a href="#f2b60ccc17" class="toc-h2 toc-link" data-title="getWikiDataLIST">getWikiDataLIST</a>
                  </li>
                  <li>
                    <a href="#fb093f1233" class="toc-h2 toc-link" data-title="bulk_getPersonLIST">bulk_getPersonLIST</a>
                  </li>
                  <li>
                    <a href="#d5a3f0c300" class="toc-h2 toc-link" data-title="bulk_getContentWordLIST">bulk_getContentWordLIST</a>
                  </li>
                  <li>
                    <a href="#448d3b7d50" class="toc-h2 toc-link" data-title="bulk_getVerbStemLIST">bulk_getVerbStemLIST</a>
                  </li>
                  <li>
                    <a href="#47c3aa3c86" class="toc-h2 toc-link" data-title="bulk_getNounStemLIST">bulk_getNounStemLIST</a>
                  </li>
                  <li>
                    <a href="#04a94d1419" class="toc-h2 toc-link" data-title="bulk_getTimeLIST">bulk_getTimeLIST</a>
                  </li>
                  <li>
                    <a href="#ac41c6fd16" class="toc-h2 toc-link" data-title="bulk_getLocationStemLIST">bulk_getLocationStemLIST</a>
                  </li>
                  <li>
                    <a href="#192ac68b92" class="toc-h2 toc-link" data-title="bulk_getOpenDataPlaceLIST">bulk_getOpenDataPlaceLIST</a>
                  </li>
                  <li>
                    <a href="#71c4451e88" class="toc-h2 toc-link" data-title="bulk_getQuestionLIST">bulk_getQuestionLIST</a>
                  </li>
                  <li>
                    <a href="#2ff73a2e60" class="toc-h2 toc-link" data-title="bulk_getAddTWLIST">bulk_getAddTWLIST</a>
                  </li>
                  <li>
                    <a href="#d93fb5759c" class="toc-h2 toc-link" data-title="bulk_getCurrencyLIST">bulk_getCurrencyLIST</a>
                  </li>
                  <li>
                    <a href="#e67438d6a5" class="toc-h2 toc-link" data-title="bulk_getWikiDataLIST">bulk_getWikiDataLIST</a>
                  </li>
              </ul>
          </li>
      </ul>
        <ul class="toc-footer">
            <li><a href='https://api.droidtown.co/login/'>註冊取得 API Key 開始使用</a></li>
            <li><a href='https://www.droidtown.co/'>Documentation Powered by Droidtown</a></li>
        </ul>
    </div>
    <div class="page-wrapper">
      <div class="dark-box"></div>
      <div class="content">
        <h1 id='7491807b37'>ArticutAPI</h1>
<aside class="notice">
ArticutAPI 採用單線程呼叫線上版 Articut。
</aside>
<h2 id='c387642405'>Articut</h2>
<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">from</span> <span class="nn">ArticutAPI</span> <span class="kn">import</span> <span class="n">Articut</span>

<span class="n">articut</span> <span class="o">=</span> <span class="n">Articut</span><span class="p">()</span>
</code></pre></div>
<p>初始化 ArticutAPI 。</p>
<h3 id='57f8354fa3'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td>username</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>你註冊時的 email。若留空，則會使用每小時更新 2000 字的公用帳號。</td>
</tr>
<tr>
<td>apikey</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>您完成付費後取得的 apikey 值。若留空，則會使用每小時更新 2000 字的公用帳號。</td>
</tr>
<tr>
<td>version</td>
<td>str</td>
<td style="text-align: center">&quot;latest&quot;</td>
<td>指定版本是選用的。如果此項留白，或指定 &quot;latest&quot;，則 Articut 將使用最新版本的演算法對您上傳的文字進行斷詞。此外，您也能指定 Articut 的演算法版本。例如，若在此項輸入字串 &quot;v001&quot;，則將會使用 v001 版本的斷詞演算法對您上傳的文字進行斷詞。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;lv2&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
</tbody></table>
<h2 id='285fc1a1cf'>parse</h2>
<p>取得 Articut 斷詞與詞性標記結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="s">"lv2"</span><span class="p">,</span> <span class="n">openDataPlaceAccessBOOL</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"document"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://api.droidtown.co/document/"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.04685401916503906</span><span class="p">,</span><span class="w">
 </span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"product"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://api.droidtown.co/product/"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
 </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
 </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"word_count_balance"</span><span class="p">:</span><span class="w"> </span><span class="mi">1869</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='9ac6bfc5ea'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>input_str</strong></td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>將要送上 Articut 進行斷詞暨詞性標記處理的文字。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center">{}</td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
<tr>
<td>openDataPlaceAccessBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td><a href="https://data.gov.tw/">政府開放平台 OpenData</a> 中存有「交通部觀光局蒐集各政府機關所發佈空間化觀光資訊」。Articut 可取用其中的資訊，並標記為 <strong><code>&lt;KNOWLEGED_place&gt;</code></strong>。</td>
</tr>
<tr>
<td>wikiDataBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>取自 <a href="https://www.wikidata.org/">Wikidata</a> 資料的中文名稱 (Label)，並標記為<strong><code>&lt;KNOWLEGED_wikiData&gt;</code></strong>。<br>Wikidata 不包含以下類型：</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 單一文字 (不含週期表元素)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電影、戲劇、節目名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電玩遊戲名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 漫畫、動畫名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 小說、書本名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 專輯、歌曲名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 藝術作品名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 提名或入圍獎項</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 動詞、時間</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- Wikimedia、Wikidata 列表</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>timeRef</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 功能，時間格式：<strong><code>&quot;yyyy-mm-dd HH:MM:SS&quot;</code></strong>，將 <strong>input_str</strong> 的句子內的時間依據此參數時間為基準，計算句子裡的相對時間或絕對時間並回傳 datetime 格式。<br><br>例如：<br><strong><code>input_str</code></strong> = <strong>&quot;蔡英文總統在今年五月二十日就職&quot;</strong>，<br><strong><code>time_ref</code></strong> = <strong>&quot;2016-01-01 00:00:00&quot;</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2016-05-20 00:00:00&quot;</strong>；<br><br>若無，則會依據系統時間為基準計算最接近的時間，<br>假設目前<strong><code>系統時間</code></strong> = <strong>2020-10-01</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2020-05-20 00:00:00&quot;</strong>。</td>
</tr>
<tr>
<td>pinyin</td>
<td>str</td>
<td style="text-align: center">&quot;BOPOMOFO&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 提供 <strong><code>&quot;BOPOMOFO&quot;</code></strong> 與 <strong><code>&quot;HANYU&quot;</code></strong> 兩種，文字轉聲音的標記 (包含破音字)。</td>
</tr>
</tbody></table>
<h2 id='24109ec8ea'>versions</h2>
<p>列出目前可使用的 Articut 版本。通常版本號愈大，完成度愈高。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">versions</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">versions</span><span class="p">()</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"document"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://api.droidtown.co/document/"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"product"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://api.droidtown.co/product/"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"versions"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-11-17"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"latest"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-11-17"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-11-11"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v224"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-10-19"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v223"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-10-12"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v222"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-10-05"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v221"</span><span class="p">},</span><span class="w">
              </span><span class="p">{</span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"lv1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lv3"</span><span class="p">],</span><span class="w">
               </span><span class="nl">"release_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-09-29"</span><span class="p">,</span><span class="w">
               </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v220"</span><span class="p">}]}</span><span class="w">
</span></code></pre></div><h2 id='731ddbecd8'>getPersonLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的人名 (Person)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">personLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getPersonLIST</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">includePronounBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">212</span><span class="p">,</span><span class="w"> </span><span class="mi">215</span><span class="p">,</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">305</span><span class="p">,</span><span class="w"> </span><span class="mi">306</span><span class="p">,</span><span class="w"> </span><span class="s2">"他"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">44</span><span class="p">,</span><span class="w"> </span><span class="mi">45</span><span class="p">,</span><span class="w"> </span><span class="s2">"你"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='ca7cb91c18'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>includePronounBOOL</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>指定為 True 時，將連代名詞 (Pronoun) 一併回傳；若指定為 False 時，則只回傳人名。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='e724744c53'>getContentWordLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的實詞 (content word)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">contentWordLIST</span> <span class="o">=</span> <span class="n">getContentWordLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='008a84d85a'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='39d54ca287'>getVerbStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的動詞 (verb)。
<aside class="notice">
此處指的是 ACTION_verb 標記的動詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">verbStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getVerbStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='5d220217ac'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='20dfc0da58'>getNounStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的名詞 (noun)。
<aside class="notice">
此處指的是 ENTITY_noun、ENTITY_nouny、ENTITY_nounHead 或 ENTITY_oov 標記的名詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">nounStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getNounStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='003ef57480'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='df44f15066'>getTimeLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的時間 (time)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"2018年7月26日"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">timeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getTimeLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">11</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="s2">"2018 年"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">40</span><span class="p">,</span><span class="w"> </span><span class="mi">42</span><span class="p">,</span><span class="w"> </span><span class="s2">"7月"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">65</span><span class="p">,</span><span class="w"> </span><span class="mi">68</span><span class="p">,</span><span class="w"> </span><span class="s2">"26日"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='1c3941d6c4'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='d1b7478ebf'>getLocationStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的地理位置 (location)。
<aside class="notice">
此處指的是地理位置標記的行政區地名詞彙，例如「台北」、「桃園」、「墨西哥」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"前天我從桃園到台北玩一整天"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">locationStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getLocationStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">93</span><span class="p">,</span><span class="w"> </span><span class="mi">95</span><span class="p">,</span><span class="w"> </span><span class="s2">"桃園"</span><span class="p">],</span><span class="w"> </span><span class="p">[</span><span class="mi">144</span><span class="p">,</span><span class="w"> </span><span class="mi">146</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='f2d538c0be'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='e44c8708ad'>getOpenDataPlaceLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的景點 (KNOWLEDGE_place) 標籤的字串。
<aside class="notice">
此處指的是景點 (KNOWLEDGE_place) 標記的非行政地點名稱詞彙，例如「鹿港老街」、「宜蘭運動公園」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我第一次來鹿港老街"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">openDataPlaceAccessBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">placeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getOpenDataPlaceLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">119</span><span class="p">,</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s2">"鹿港老街"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='52cd23d8e1'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='62c7106676'>getQuestionLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (CLAUSE_Q) 標籤的句子。
<aside class="notice">
此處指的是<br />
    <code>&lt;CLAUSE_AnotAQ&gt;:&gt;</code> A-not-A 問句<br />
    <code>&lt;CLAUSE_YesNoQ&gt;:&gt;</code> 是非問句<br />
    <code>&lt;CLAUSE_WhoQ&quot;&gt;:&gt;</code> 「誰」問句<br />
    <code>&lt;CLAUSE_WhatQ&gt;:&gt;</code> 「物」問句<br />
    <code>&lt;CLAUSE_WhereQ&gt;:&gt;</code> 「何地」問句<br />
    <code>&lt;CLAUSE_WhenQ&gt;:&gt;</code> 「何時」問句<br />
    <code>&lt;CLAUSE_HowQ&gt;:&gt;</code> 「程度/過程」問句<br />
    <code>&lt;CLAUSE_WhyQ&gt;:&gt;</code> 「原因」問句<br />
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你要不要吃餅乾"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">questionLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getQuestionLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="s2">"&lt;CLAUSE_AnotAQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"你要不要吃餅乾"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='c7b2d45cbb'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='8cdcb0ad5f'>getAddTWLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (KNOWLEDGE_addTW) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"地址：宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">addTWLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getAddTWLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="mi">37</span><span class="p">,</span><span class="w"> </span><span class="s2">"宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='9a916f4a43'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='0810c6f202'>getCurrencyLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的貨幣金額 (KNOWLEDGE_currency) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我想知道300英鎊可以換多少美金"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">currencyResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getCurrencyLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">116</span><span class="p">,</span><span class="w"> </span><span class="s2">"300英鎊"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='0ed6697b3f'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>greedyBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>指定為 True 時，將返回「貨幣名稱 + 數字」 (包含「&#39;」與「,」符號) 格式。</td>
</tr>
</tbody></table>
<h2 id='9ca302438b'>getWikiDataLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的 WikiData 標記文字。<aside class="notice">
此處指的是 KNOWLEDGE_wikiData 標記的條目名稱。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"什麼是黏體動物"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">wikiDataLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getWikiDataLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">63</span><span class="p">,</span><span class="w"> </span><span class="mi">67</span><span class="p">,</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='7579816694'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='7deccb0683'>graphQL</h2>
<p>使用 GraphQL 查詢 Articut 斷詞與詞性標記結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">import</span> <span class="nn">json</span>

<span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"什麼是黏體動物"</span>
<span class="n">resultFilePath</span> <span class="o">=</span> <span class="s">"articutResult.json"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">resultFilePath</span><span class="p">,</span> <span class="s">"w"</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">)</span> <span class="k">as</span> <span class="n">resultFile</span><span class="p">:</span>
    <span class="n">json</span><span class="p">.</span><span class="n">dump</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">resultFile</span><span class="p">,</span> <span class="n">ensure_ascii</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

<span class="n">graphQLResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">graphQL</span><span class="p">.</span><span class="n">query</span><span class="p">(</span>
    <span class="n">filePath</span><span class="o">=</span><span class="n">resultFilePath</span><span class="p">,</span>
    <span class="n">query</span><span class="o">=</span><span class="s">"""
{
  meta {
    lang
    description
  }
  doc {
    text
    tokens {
      text
      pos_
      tag_
      isStop
      isEntity
      isVerb
      isTime
      isClause
      isKnowledge
    }
    ents {
      persons {
        text
        pos_
        tag_
      }
      nouns {
        text
        pos_
        tag_
      }
      numbers {
        text
        pos_
        tag_
      }
      sites {
        text
        pos_
        tag_
      }
    }
  }
}"""</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"nlp"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"doc"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"ents"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"nouns"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w">
                                   </span><span class="nl">"numbers"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w">
                                   </span><span class="nl">"persons"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w">
                                   </span><span class="nl">"sites"</span><span class="p">:</span><span class="w"> </span><span class="p">[]},</span><span class="w">
                          </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"什麼是黏體動物"</span><span class="p">,</span><span class="w">
                          </span><span class="nl">"tokens"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nl">"isClause"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isEntity"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isKnowledge"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isStop"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isTime"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isVerb"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"pos_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"OTHER"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"tag_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"CLAUSE_WhatQ"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"什麼"</span><span class="p">},</span><span class="w">
                                     </span><span class="p">{</span><span class="nl">"isClause"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isEntity"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isKnowledge"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isStop"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isTime"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isVerb"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"pos_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"AUX"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"tag_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"AUX"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"是"</span><span class="p">},</span><span class="w">
                                     </span><span class="p">{</span><span class="nl">"isClause"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isEntity"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isKnowledge"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isStop"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isTime"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"isVerb"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"pos_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"OTHER"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"tag_"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w">
                                      </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">}]},</span><span class="w">
                  </span><span class="nl">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut GraphQL Query Result."</span><span class="p">,</span><span class="w">
                           </span><span class="nl">"lang"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TW"</span><span class="p">}}}}</span><span class="w">
</span></code></pre></div><h1 id='8031f9d08c'>MP_ArticutAPI</h1>
<aside class="notice">
MP_ArticutAPI 採用多線程呼叫 Articut，最多使用 8 線程。
</aside>

<aside class="warning">
MP_ArticutAPI 僅限 Articut Docker 使用。
</aside>
<h2 id='c47653a06f'>MP_Articut</h2>
<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">from</span> <span class="nn">MP_ArticutAPI</span> <span class="kn">import</span> <span class="n">MP_Articut</span>

<span class="n">articut</span> <span class="o">=</span> <span class="n">MP_Articut</span><span class="p">()</span>
</code></pre></div>
<p>初始化 MP_ArticutAPI 。</p>
<h3 id='1c9a5207ed'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td>url</td>
<td>str</td>
<td style="text-align: center">&quot;http://127.0.0.1&quot;</td>
<td>自行架設 Articut Docker 的服務網址。</td>
</tr>
<tr>
<td>port</td>
<td>str</td>
<td style="text-align: center">&quot;8964&quot;</td>
<td>自行架設 Articut Docker 的服務通訊埠。</td>
</tr>
<tr>
<td>bulkSize</td>
<td>int</td>
<td style="text-align: center">20</td>
<td>指定每個線程一次能送上 Articut 進行斷詞暨詞性標記處理的句子數量。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center"></td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
</tbody></table>
<h2 id='6e0923bef9'>parse</h2>
<p>取得 Articut 斷詞與詞性標記結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.11843991279602051</span><span class="p">,</span><span class="w">
 </span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown Linguist Tech."</span><span class="p">,</span><span class="w">
 </span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
 </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
 </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">],</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='5ff1020dda'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>input_str</strong></td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>將要送上 Articut 進行斷詞暨詞性標記處理的文字。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;lv2&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center">{}</td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
<tr>
<td>openDataPlaceBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td><a href="https://data.gov.tw/">政府開放平台 OpenData</a> 中存有「交通部觀光局蒐集各政府機關所發佈空間化觀光資訊」。Articut 可取用其中的資訊，並標記為 <strong><code>&lt;KNOWLEGED_place&gt;</code></strong>。</td>
</tr>
<tr>
<td>wikiDataBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>取自 <a href="https://www.wikidata.org/">Wikidata</a> 資料的中文名稱 (Label)，並標記為<strong><code>&lt;KNOWLEGED_wikiData&gt;</code></strong>。<br>Wikidata 不包含以下類型：</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 單一文字 (不含週期表元素)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電影、戲劇、節目名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電玩遊戲名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 漫畫、動畫名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 小說、書本名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 專輯、歌曲名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 藝術作品名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 提名或入圍獎項</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 動詞、時間</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- Wikimedia、Wikidata 列表</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>timeRef</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 功能，時間格式：<strong><code>&quot;yyyy-mm-dd HH:MM:SS&quot;</code></strong>，將 <strong>input_str</strong> 的句子內的時間依據此參數時間為基準，計算句子裡的相對時間或絕對時間並回傳 datetime 格式。<br><br>例如：<br><strong><code>input_str</code></strong> = <strong>&quot;蔡英文總統在今年五月二十日就職&quot;</strong>，<br><strong><code>time_ref</code></strong> = <strong>&quot;2016-01-01 00:00:00&quot;</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2016-05-20 00:00:00&quot;</strong>；<br><br>若無，則會依據系統時間為基準計算最接近的時間，<br>假設目前<strong><code>系統時間</code></strong> = <strong>2020-10-01</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2020-05-20 00:00:00&quot;</strong>。</td>
</tr>
<tr>
<td>pinyin</td>
<td>str</td>
<td style="text-align: center">&quot;BOPOMOFO&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 提供 <strong><code>&quot;BOPOMOFO&quot;</code></strong> 與 <strong><code>&quot;HANYU&quot;</code></strong> 兩種，文字轉聲音的標記 (包含破音字)。</td>
</tr>
</tbody></table>
<h2 id='61a46a5471'>bulk_parse</h2>
<p>一次取得大量句子的 Articut 斷詞與詞性標記結果。
<aside class="notice">
在 Articut Docker 中，最耗時的是建立連線，bulk_parse 即是建立連線後一次處理多句句子，進而達到加速的作用。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[{</span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown "</span><span class="w">
          </span><span class="s2">"Linguist Tech."</span><span class="p">,</span><span class="w">
  </span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_list"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.00998067855834961</span><span class="p">,</span><span class="w">
                   </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
                   </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
                   </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">]},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.24787235260009766</span><span class="p">,</span><span class="w">
                   </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TIME_day"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"到"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"找"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"他"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"FUNC_inner"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"的"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"，"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"請"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_quantifiedVerb"</span><span class="p">,</span><span class="w">
                                    </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"安排一下"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"！"</span><span class="p">}]],</span><span class="w">
                   </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_person&gt;蔡英文&lt;/ENTITY_person&gt;&lt;ENTITY_noun&gt;總統&lt;/ENTITY_noun&gt;&lt;TIME_day&gt;明日&lt;/TIME_day&gt;&lt;ACTION_verb&gt;到&lt;/ACTION_verb&gt;&lt;LOCATION&gt;台北&lt;/LOCATION&gt;&lt;ENTITY_nouny&gt;市政府&lt;/ENTITY_nouny&gt;&lt;ACTION_verb&gt;找&lt;/ACTION_verb&gt;&lt;ENTITY_person&gt;柯文哲&lt;/ENTITY_person&gt;&lt;ACTION_verb&gt;開會&lt;/ACTION_verb&gt;&lt;ACTION_verb&gt;討論&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;他&lt;/ENTITY_pronoun&gt;&lt;FUNC_inner&gt;的&lt;/FUNC_inner&gt;&lt;ENTITY_nouny&gt;想法&lt;/ENTITY_nouny&gt;"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"&lt;ACTION_verb&gt;請&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;ACTION_quantifiedVerb&gt;安排一下&lt;/ACTION_quantifiedVerb&gt;"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"！"</span><span class="p">],</span><span class="w">
                   </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"蔡英文/總統/明日/到/台北/市政府/找/柯文哲/開會/討論/他/的/想法"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"請/你/安排一下"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"！"</span><span class="p">]}],</span><span class="w">
  </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
  </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}]</span><span class="w">
</span></code></pre></div><h3 id='2dc8fa62b9'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>input_str</strong></td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>將要送上 Articut 進行斷詞暨詞性標記處理的文字。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;lv2&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center">{}</td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
<tr>
<td>openDataPlaceBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td><a href="https://data.gov.tw/">政府開放平台 OpenData</a> 中存有「交通部觀光局蒐集各政府機關所發佈空間化觀光資訊」。Articut 可取用其中的資訊，並標記為 <strong><code>&lt;KNOWLEGED_place&gt;</code></strong>。</td>
</tr>
<tr>
<td>wikiDataBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>取自 <a href="https://www.wikidata.org/">Wikidata</a> 資料的中文名稱 (Label)，並標記為<strong><code>&lt;KNOWLEGED_wikiData&gt;</code></strong>。<br>Wikidata 不包含以下類型：</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 單一文字 (不含週期表元素)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電影、戲劇、節目名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電玩遊戲名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 漫畫、動畫名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 小說、書本名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 專輯、歌曲名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 藝術作品名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 提名或入圍獎項</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 動詞、時間</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- Wikimedia、Wikidata 列表</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>timeRef</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 功能，時間格式：<strong><code>&quot;yyyy-mm-dd HH:MM:SS&quot;</code></strong>，將 <strong>input_str</strong> 的句子內的時間依據此參數時間為基準，計算句子裡的相對時間或絕對時間並回傳 datetime 格式。<br><br>例如：<br><strong><code>input_str</code></strong> = <strong>&quot;蔡英文總統在今年五月二十日就職&quot;</strong>，<br><strong><code>time_ref</code></strong> = <strong>&quot;2016-01-01 00:00:00&quot;</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2016-05-20 00:00:00&quot;</strong>；<br><br>若無，則會依據系統時間為基準計算最接近的時間，<br>假設目前<strong><code>系統時間</code></strong> = <strong>2020-10-01</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2020-05-20 00:00:00&quot;</strong>。</td>
</tr>
<tr>
<td>pinyin</td>
<td>str</td>
<td style="text-align: center">&quot;BOPOMOFO&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 提供 <strong><code>&quot;BOPOMOFO&quot;</code></strong> 與 <strong><code>&quot;HANYU&quot;</code></strong> 兩種，文字轉聲音的標記 (包含破音字)。</td>
</tr>
</tbody></table>
<h2 id='573b2a4254'>mergeBulkResult</h2>
<p>合併 bulk_parse() 的結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputLIST</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.021231889724731445</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
  </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;KNOWLEDGE_wikiData&gt;人類&lt;/KNOWLEDGE_wikiData&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
  </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">]},</span><span class="w">
 </span><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.07153630256652832</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TIME_day"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"到"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"台北市"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"政府"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"找"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"他"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"FUNC_inner"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"的"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"KNOWLEDGE_wikiData"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"，"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"請"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_quantifiedVerb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"安排一下"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"！"</span><span class="p">}]],</span><span class="w">
  </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;KNOWLEDGE_wikiData&gt;蔡英文&lt;/KNOWLEDGE_wikiData&gt;&lt;KNOWLEDGE_wikiData&gt;總統&lt;/KNOWLEDGE_wikiData&gt;&lt;TIME_day&gt;明日&lt;/TIME_day&gt;&lt;ACTION_verb&gt;到&lt;/ACTION_verb&gt;&lt;LOCATION&gt;台北市&lt;/LOCATION&gt;&lt;KNOWLEDGE_wikiData&gt;政府&lt;/KNOWLEDGE_wikiData&gt;&lt;ACTION_verb&gt;找&lt;/ACTION_verb&gt;&lt;KNOWLEDGE_wikiData&gt;柯文哲&lt;/KNOWLEDGE_wikiData&gt;&lt;ACTION_verb&gt;開會&lt;/ACTION_verb&gt;&lt;ACTION_verb&gt;討論&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;他&lt;/ENTITY_pronoun&gt;&lt;FUNC_inner&gt;的&lt;/FUNC_inner&gt;&lt;KNOWLEDGE_wikiData&gt;想法&lt;/KNOWLEDGE_wikiData&gt;"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"&lt;ACTION_verb&gt;請&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;ACTION_quantifiedVerb&gt;安排一下&lt;/ACTION_quantifiedVerb&gt;"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"！"</span><span class="p">],</span><span class="w">
  </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"蔡英文/總統/明日/到/台北市/政府/找/柯文哲/開會/討論/他/的/想法"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"請/你/安排一下"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"！"</span><span class="p">]}]</span><span class="w">
</span></code></pre></div><h3 id='f133b1944f'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>inputLIST</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut bulk_parse() 的結果。</td>
</tr>
</tbody></table>
<h2 id='c005725d6c'>version</h2>
<p>列出目前使用的 Articut 版本。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">version</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">version</span><span class="p">()</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown Linguist "</span><span class="w">
         </span><span class="s2">"Tech."</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}</span><span class="w">
</span></code></pre></div><h2 id='27b69f331b'>getPersonLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的人名 (Person)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">personLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getPersonLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">212</span><span class="p">,</span><span class="w"> </span><span class="mi">215</span><span class="p">,</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">305</span><span class="p">,</span><span class="w"> </span><span class="mi">306</span><span class="p">,</span><span class="w"> </span><span class="s2">"他"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">44</span><span class="p">,</span><span class="w"> </span><span class="mi">45</span><span class="p">,</span><span class="w"> </span><span class="err">'你'</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='73749d6566'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>includePronounBOOL</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>指定為 True 時，將連代名詞 (Pronoun) 一併回傳；若指定為 False 時，則只回傳人名。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='5e39797142'>getContentWordLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的實詞 (content word)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">contentWordLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getContentWordLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='3eb806d686'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='dca48e7304'>getVerbStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的動詞 (verb)。
<aside class="notice">
此處指的是 ACTION_verb 標記的動詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">verbStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getVerbStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='5d492eb559'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='1b38f2f1b0'>getNounStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的名詞 (noun)。
<aside class="notice">
此處指的是 ENTITY_noun、ENTITY_nouny、ENTITY_nounHead 或 ENTITY_oov 標記的名詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">nounStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getNounStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='4ec4062c7d'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='9c01b9f0da'>getTimeLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的時間 (time)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"2018年7月26日"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">timeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getTimeLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">11</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="s2">"2018 年"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">40</span><span class="p">,</span><span class="w"> </span><span class="mi">42</span><span class="p">,</span><span class="w"> </span><span class="s2">"7月"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">65</span><span class="p">,</span><span class="w"> </span><span class="mi">68</span><span class="p">,</span><span class="w"> </span><span class="s2">"26日"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='6a91eb377b'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='d3565b71de'>getLocationStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的地理位置 (location)。
<aside class="notice">
此處指的是地理位置標記的行政區地名詞彙，例如「台北」、「桃園」、「墨西哥」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"前天我從桃園到台北玩一整天"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">locationStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getLocationStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">93</span><span class="p">,</span><span class="w"> </span><span class="mi">95</span><span class="p">,</span><span class="w"> </span><span class="s2">"桃園"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">144</span><span class="p">,</span><span class="w"> </span><span class="mi">146</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='b305f834bc'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='08225fd4a4'>getOpenDataPlaceLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的景點 (KNOWLEDGE_place) 標籤的字串。
<aside class="notice">
此處指的是景點 (KNOWLEDGE_place) 標記的非行政地點名稱詞彙，例如「鹿港老街」、「宜蘭運動公園」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我第一次來鹿港老街"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">openDataPlaceAccessBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">placeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getOpenDataPlaceLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">119</span><span class="p">,</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s2">"鹿港老街"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='fe5664986f'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='0f2c76b862'>getQuestionLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (CLAUSE_Q) 標籤的句子。
<aside class="notice">
此處指的是<br />
    <code>&lt;CLAUSE_AnotAQ&gt;:</code> A-not-A 問句<br />
    <code>&lt;CLAUSE_YesNoQ&gt;:</code> 是非問句<br />
    <code>&lt;CLAUSE_WhoQ&quot;&gt;:</code> 「誰」問句<br />
    <code>&lt;CLAUSE_WhatQ&gt;:</code> 「物」問句<br />
    <code>&lt;CLAUSE_WhereQ&gt;:</code> 「何地」問句<br />
    <code>&lt;CLAUSE_WhenQ&gt;:</code> 「何時」問句<br />
    <code>&lt;CLAUSE_HowQ&gt;:</code> 「程度/過程」問句<br />
    <code>&lt;CLAUSE_WhyQ&gt;:</code> 「原因」問句<br />
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你要不要吃餅乾"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">questionLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getQuestionLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="s2">"&lt;CLAUSE_AnotAQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"你要不要吃餅乾"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='fd8ae69793'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='707b413d51'>getAddTWLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (KNOWLEDGE_addTW) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"地址：宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">addTWLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getAddTWLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="mi">37</span><span class="p">,</span><span class="w"> </span><span class="s2">"宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='49457a666d'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='1d4c6cce67'>getCurrencyLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的貨幣金額 (KNOWLEDGE_currency) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我想知道300英鎊可以換多少美金"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">currencyResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getCurrencyLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">116</span><span class="p">,</span><span class="w"> </span><span class="s2">"300英鎊"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='2000102c96'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>greedyBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>指定為 True 時，將返回「貨幣名稱 + 數字」 (包含「&#39;」與「,」符號) 格式。</td>
</tr>
</tbody></table>
<h2 id='b4865d0fa1'>getWikiDataLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的 WikiData 標記文字。<aside class="notice">
此處指的是 KNOWLEDGE_wikiData 標記的條目名稱。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"什麼是黏體動物"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">wikiDataLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getWikiDataLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">63</span><span class="p">,</span><span class="w"> </span><span class="mi">67</span><span class="p">,</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='c2ddc38015'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='4354923e3f'>bulk_getPersonLIST</h2>
<p>取出 bulk_parse() 結果中的人名 (Person)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">personLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getPersonLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">16</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="s2">"你"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="err">(</span><span class="mi">212</span><span class="p">,</span><span class="w"> </span><span class="mi">215</span><span class="p">,</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">305</span><span class="p">,</span><span class="w"> </span><span class="mi">306</span><span class="p">,</span><span class="w"> </span><span class="s2">"他"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">44</span><span class="p">,</span><span class="w"> </span><span class="mi">45</span><span class="p">,</span><span class="w"> </span><span class="s2">"你"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='c1767d7b66'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>includePronounBOOL</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>指定為 True 時，將連代名詞 (Pronoun) 一併回傳；若指定為 False 時，則只回傳人名。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='9bb3555d98'>bulk_getContentWordLIST</h2>
<p>取出 bulk_parse() 結果中的實詞 (content word)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">contentWordLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getContentWordLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">88</span><span class="p">,</span><span class="w"> </span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">138</span><span class="p">,</span><span class="w"> </span><span class="mi">140</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='ed05ecee71'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='f149f3f437'>bulk_getVerbStemLIST</h2>
<p>取出 bulk_parse() 結果中的動詞 (verb)。
<aside class="notice">
此處指的是 ACTION_verb 標記的動詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">verbStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getVerbStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='4164da4390'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='a9b0e3b401'>bulk_getNounStemLIST</h2>
<p>取出 bulk_parse() 結果中的名詞 (noun)。
<aside class="notice">
此處指的是 ENTITY_noun、ENTITY_nouny、ENTITY_nounHead 或 ENTITY_oov 標記的名詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">nounStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getNounStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">88</span><span class="p">,</span><span class="w"> </span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">138</span><span class="p">,</span><span class="w"> </span><span class="mi">140</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
   </span><span class="p">[],</span><span class="w">
   </span><span class="p">[],</span><span class="w">
   </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='43300e5e3d'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='cb9c49869d'>bulk_getTimeLIST</h2>
<p>取出 bulk_parse() 結果中的時間 (time)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">timeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getTimeLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">73</span><span class="p">,</span><span class="w"> </span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='f84976d345'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='7e0ebbef3e'>bulk_getLocationStemLIST</h2>
<p>取出 bulk_parse() 結果中的地理位置 (location)。
<aside class="notice">
此處指的是地理位置標記的行政區地名詞彙，例如「台北」、「桃園」、「墨西哥」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">locationStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span> <span class="n">bulk_getLocationStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">62</span><span class="p">,</span><span class="w"> </span><span class="mi">64</span><span class="p">,</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">124</span><span class="p">,</span><span class="w"> </span><span class="mi">126</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='af0ea9e770'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='0223e31c79'>bulk_getOpenDataPlaceLIST</h2>
<p>取出 bulk_parse() 結果中的景點 (KNOWLEDGE_place) 標籤的字串。
<aside class="notice">
此處指的是景點 (KNOWLEDGE_place) 標記的非行政地點名稱詞彙，例如「鹿港老街」、「宜蘭運動公園」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span><span class="p">,</span>
    <span class="s">"我第一次來鹿港老街"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">openDataPlaceBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">placeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getOpenDataPlaceLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[]],</span><span class="w">
 </span><span class="p">[[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">119</span><span class="p">,</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s2">"鹿港老街"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='84e5a029eb'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='5edd050642'>bulk_getQuestionLIST</h2>
<p>取出 bulk_parse() 結果中含有 (CLAUSE_Q) 標籤的句子。
<aside class="notice">
此處指的是<br />
    <code>&lt;CLAUSE_AnotAQ&gt;:</code> A-not-A 問句<br />
    <code>&lt;CLAUSE_YesNoQ&gt;:</code> 是非問句<br />
    <code>&lt;CLAUSE_WhoQ&quot;&gt;:</code> 「誰」問句<br />
    <code>&lt;CLAUSE_WhatQ&gt;:</code> 「物」問句<br />
    <code>&lt;CLAUSE_WhereQ&gt;:</code> 「何地」問句<br />
    <code>&lt;CLAUSE_WhenQ&gt;:</code> 「何時」問句<br />
    <code>&lt;CLAUSE_HowQ&gt;:</code> 「程度/過程」問句<br />
    <code>&lt;CLAUSE_WhyQ&gt;:</code> 「原因」問句<br />
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你到底要不要吃"</span><span class="p">,</span>
    <span class="s">"明天要去哪裡玩呢"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">questionLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getQuestionLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="s2">"&lt;CLAUSE_AnotAQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"你到底要不要吃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="s2">"&lt;CLAUSE_WhereQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"明天要去哪裡玩呢"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='499fc0dca0'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='2f92751807'>bulk_getAddTWLIST</h2>
<p>取出 bulk_parse() 結果中含有 (KNOWLEDGE_addTW) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"地址：宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">,</span>
    <span class="s">"我們去台北市信義區信義路五段7號"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">addTWLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getAddTWLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="mi">37</span><span class="p">,</span><span class="w"> </span><span class="s2">"宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">80</span><span class="p">,</span><span class="w"> </span><span class="mi">93</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北市信義區信義路五段7號"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='40774ad625'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='5c65d343db'>bulk_getCurrencyLIST</h2>
<p>取出 bulk_parse() 結果中的貨幣金額 (KNOWLEDGE_currency) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"我想知道300英鎊可以換多少美金"</span><span class="p">,</span>
    <span class="s">"1萬美金等於多少台幣呢"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">currencyResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getCurrencyLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">116</span><span class="p">,</span><span class="w"> </span><span class="s2">"300英鎊"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">24</span><span class="p">,</span><span class="w"> </span><span class="s2">"1萬美金"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='f420b8ffe6'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>greedyBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>指定為 True 時，將返回「貨幣名稱 + 數字」 (包含「&#39;」與「,」符號) 格式。</td>
</tr>
</tbody></table>
<h2 id='3e4a9505fe'>bulk_getWikiDataLIST</h2>
<p>取出 bulk_parse() 結果中的 WikiData 標記文字。<aside class="notice">
此處指的是 KNOWLEDGE_wikiData 標記的條目名稱。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"什麼是黏體動物"</span><span class="p">,</span>
    <span class="s">"陽明山上開滿了海芋"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">wikiDataLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getWikiDataLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">63</span><span class="p">,</span><span class="w"> </span><span class="mi">67</span><span class="p">,</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">96</span><span class="p">,</span><span class="w"> </span><span class="mi">98</span><span class="p">,</span><span class="w"> </span><span class="s2">"海芋"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='f09db0042c'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h1 id='f824f41126'>WS_ArticutAPI</h1>
<aside class="notice">
WS_ArticutAPI 採用 Websocket 與 Articut 建立連線，省去每次建立連線的時間。
</aside>

<aside class="warning">
WS_ArticutAPI 僅限 Articut Docker 使用。
</aside>
<h2 id='31b2a7d248'>WS_Articut</h2>
<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">from</span> <span class="nn">WS_ArticutAPI</span> <span class="kn">import</span> <span class="n">WS_Articut</span>

<span class="n">articut</span> <span class="o">=</span> <span class="n">WS_Articut</span><span class="p">()</span>
</code></pre></div>
<p>初始化 WS_ArticutAPI 。</p>
<h3 id='0f89902a72'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td>url</td>
<td>str</td>
<td style="text-align: center">&quot;ws://127.0.0.1&quot;</td>
<td>自行架設 Articut Docker 的服務網址。</td>
</tr>
<tr>
<td>port</td>
<td>str</td>
<td style="text-align: center">&quot;8964&quot;</td>
<td>自行架設 Articut Docker 的服務通訊埠。</td>
</tr>
<tr>
<td>bulkSize</td>
<td>int</td>
<td style="text-align: center">20</td>
<td>指定每個線程一次能送上 Articut 進行斷詞暨詞性標記處理的句子數量。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center"></td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
</tbody></table>
<h2 id='820c35b4c0'>parse</h2>
<p>取得 Articut 斷詞與詞性標記結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.009813547134399414</span><span class="p">,</span><span class="w">
 </span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown Linguist Tech."</span><span class="p">,</span><span class="w">
 </span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                 </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
 </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
 </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">],</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}</span><span class="w">
</span></code></pre></div><h3 id='31d9c91d9e'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>input_str</strong></td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>將要送上 Articut 進行斷詞暨詞性標記處理的文字。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;lv2&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center">{}</td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
<tr>
<td>openDataPlaceBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td><a href="https://data.gov.tw/">政府開放平台 OpenData</a> 中存有「交通部觀光局蒐集各政府機關所發佈空間化觀光資訊」。Articut 可取用其中的資訊，並標記為 <strong><code>&lt;KNOWLEGED_place&gt;</code></strong>。</td>
</tr>
<tr>
<td>wikiDataBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>取自 <a href="https://www.wikidata.org/">Wikidata</a> 資料的中文名稱 (Label)，並標記為<strong><code>&lt;KNOWLEGED_wikiData&gt;</code></strong>。<br>Wikidata 不包含以下類型：</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 單一文字 (不含週期表元素)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電影、戲劇、節目名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電玩遊戲名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 漫畫、動畫名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 小說、書本名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 專輯、歌曲名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 藝術作品名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 提名或入圍獎項</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 動詞、時間</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- Wikimedia、Wikidata 列表</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>timeRef</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 功能，時間格式：<strong><code>&quot;yyyy-mm-dd HH:MM:SS&quot;</code></strong>，將 <strong>input_str</strong> 的句子內的時間依據此參數時間為基準，計算句子裡的相對時間或絕對時間並回傳 datetime 格式。<br><br>例如：<br><strong><code>input_str</code></strong> = <strong>&quot;蔡英文總統在今年五月二十日就職&quot;</strong>，<br><strong><code>time_ref</code></strong> = <strong>&quot;2016-01-01 00:00:00&quot;</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2016-05-20 00:00:00&quot;</strong>；<br><br>若無，則會依據系統時間為基準計算最接近的時間，<br>假設目前<strong><code>系統時間</code></strong> = <strong>2020-10-01</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2020-05-20 00:00:00&quot;</strong>。</td>
</tr>
<tr>
<td>pinyin</td>
<td>str</td>
<td style="text-align: center">&quot;BOPOMOFO&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 提供 <strong><code>&quot;BOPOMOFO&quot;</code></strong> 與 <strong><code>&quot;HANYU&quot;</code></strong> 兩種，文字轉聲音的標記 (包含破音字)。</td>
</tr>
</tbody></table>
<h2 id='ea520a2328'>bulk_parse</h2>
<p>一次取得大量句子的 Articut 斷詞與詞性標記結果。
<aside class="notice">
在 Articut Docker 中，最耗時的是建立連線，bulk_parse 即是建立連線後一次處理多句句子，進而達到加速的作用。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[{</span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown "</span><span class="w">
          </span><span class="s2">"Linguist Tech."</span><span class="p">,</span><span class="w">
  </span><span class="nl">"level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"lv2"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_list"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.010166168212890625</span><span class="p">,</span><span class="w">
                   </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
                   </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
                   </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">]},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.04291224479675293</span><span class="p">,</span><span class="w">
                   </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TIME_day"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"到"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"找"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"他"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"FUNC_inner"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"的"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"，"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"請"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                                   </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_quantifiedVerb"</span><span class="p">,</span><span class="w">
                                    </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"安排一下"</span><span class="p">}],</span><span class="w">
                                  </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"！"</span><span class="p">}]],</span><span class="w">
                   </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_person&gt;蔡英文&lt;/ENTITY_person&gt;&lt;ENTITY_noun&gt;總統&lt;/ENTITY_noun&gt;&lt;TIME_day&gt;明日&lt;/TIME_day&gt;&lt;ACTION_verb&gt;到&lt;/ACTION_verb&gt;&lt;LOCATION&gt;台北&lt;/LOCATION&gt;&lt;ENTITY_nouny&gt;市政府&lt;/ENTITY_nouny&gt;&lt;ACTION_verb&gt;找&lt;/ACTION_verb&gt;&lt;ENTITY_person&gt;柯文哲&lt;/ENTITY_person&gt;&lt;ACTION_verb&gt;開會&lt;/ACTION_verb&gt;&lt;ACTION_verb&gt;討論&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;他&lt;/ENTITY_pronoun&gt;&lt;FUNC_inner&gt;的&lt;/FUNC_inner&gt;&lt;ENTITY_nouny&gt;想法&lt;/ENTITY_nouny&gt;"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"&lt;ACTION_verb&gt;請&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;ACTION_quantifiedVerb&gt;安排一下&lt;/ACTION_quantifiedVerb&gt;"</span><span class="p">,</span><span class="w">
                                  </span><span class="s2">"！"</span><span class="p">],</span><span class="w">
                   </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"蔡英文/總統/明日/到/台北/市政府/找/柯文哲/開會/討論/他/的/想法"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"請/你/安排一下"</span><span class="p">,</span><span class="w">
                                           </span><span class="s2">"！"</span><span class="p">]}],</span><span class="w">
  </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
  </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}]</span><span class="w">
</span></code></pre></div><h3 id='1c8dde8c57'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>input_str</strong></td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td>將要送上 Articut 進行斷詞暨詞性標記處理的文字。</td>
</tr>
<tr>
<td>level</td>
<td>str</td>
<td style="text-align: center">&quot;lv2&quot;</td>
<td>可為 &quot;lv1&quot;、&quot;lv2&quot; 或 &quot;lv3&quot;。指定為 lv1 時，將直接透過句子本身的語法結構進行推算，可視為「沒有百科知識」，只有語法能力的斷詞結果。若指定為 lv2 時，則會額外引入卓騰的百科知識庫輔助運算。若指定為 lv3 時，能夠計算出<strong>人、事、時、地、物、數字及拼音</strong>。</td>
</tr>
<tr>
<td>userDefinedDictFILE</td>
<td>dict</td>
<td style="text-align: center">{}</td>
<td>使用者自定詞典，必須是 dictionary 格式。<br>(e.g. userDefinedDictFILE = {&quot;key&quot;: [&quot;value1&quot;, &quot;value2&quot;,...],...})。</td>
</tr>
<tr>
<td>openDataPlaceBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td><a href="https://data.gov.tw/">政府開放平台 OpenData</a> 中存有「交通部觀光局蒐集各政府機關所發佈空間化觀光資訊」。Articut 可取用其中的資訊，並標記為 <strong><code>&lt;KNOWLEGED_place&gt;</code></strong>。</td>
</tr>
<tr>
<td>wikiDataBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>取自 <a href="https://www.wikidata.org/">Wikidata</a> 資料的中文名稱 (Label)，並標記為<strong><code>&lt;KNOWLEGED_wikiData&gt;</code></strong>。<br>Wikidata 不包含以下類型：</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 單一文字 (不含週期表元素)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電影、戲劇、節目名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 電玩遊戲名稱 (含系列)</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 漫畫、動畫名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 小說、書本名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 專輯、歌曲名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 藝術作品名稱</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 提名或入圍獎項</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- 動詞、時間</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align: center"></td>
<td>- Wikimedia、Wikidata 列表</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>timeRef</td>
<td>str</td>
<td style="text-align: center">&quot;&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 功能，時間格式：<strong><code>&quot;yyyy-mm-dd HH:MM:SS&quot;</code></strong>，將 <strong>input_str</strong> 的句子內的時間依據此參數時間為基準，計算句子裡的相對時間或絕對時間並回傳 datetime 格式。<br><br>例如：<br><strong><code>input_str</code></strong> = <strong>&quot;蔡英文總統在今年五月二十日就職&quot;</strong>，<br><strong><code>time_ref</code></strong> = <strong>&quot;2016-01-01 00:00:00&quot;</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2016-05-20 00:00:00&quot;</strong>；<br><br>若無，則會依據系統時間為基準計算最接近的時間，<br>假設目前<strong><code>系統時間</code></strong> = <strong>2020-10-01</strong>，<br>結果為 <strong><code>datetime</code></strong> = <strong>&quot;2020-05-20 00:00:00&quot;</strong>。</td>
</tr>
<tr>
<td>pinyin</td>
<td>str</td>
<td style="text-align: center">&quot;BOPOMOFO&quot;</td>
<td><strong>&quot;lv3&quot;</strong> 提供 <strong><code>&quot;BOPOMOFO&quot;</code></strong> 與 <strong><code>&quot;HANYU&quot;</code></strong> 兩種，文字轉聲音的標記 (包含破音字)。</td>
</tr>
</tbody></table>
<h2 id='bd9787d8ce'>mergeBulkResult</h2>
<p>合併 bulk_parse() 的結果。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputLIST</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.011087417602539062</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃過"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VerbP"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"補完"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nounHead"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">}]],</span><span class="w">
  </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;VerbP&gt;計劃過&lt;/VerbP&gt;&lt;LOCATION&gt;地球&lt;/LOCATION&gt;&lt;ENTITY_noun&gt;人類&lt;/ENTITY_noun&gt;&lt;VerbP&gt;補完&lt;/VerbP&gt;&lt;ENTITY_nounHead&gt;計劃&lt;/ENTITY_nounHead&gt;"</span><span class="p">],</span><span class="w">
  </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"你/計劃過/地球/人類/補完/計劃"</span><span class="p">]},</span><span class="w">
 </span><span class="p">{</span><span class="nl">"exec_time"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.0493474006652832</span><span class="p">,</span><span class="w">
  </span><span class="nl">"result_obj"</span><span class="p">:</span><span class="w"> </span><span class="p">[[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_noun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TIME_day"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"到"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LOCATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"找"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_person"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"他"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"FUNC_inner"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"的"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_nouny"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"，"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_verb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"請"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ENTITY_pronoun"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"你"</span><span class="p">},</span><span class="w">
                  </span><span class="p">{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ACTION_quantifiedVerb"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"安排一下"</span><span class="p">}],</span><span class="w">
                 </span><span class="p">[{</span><span class="nl">"pos"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PUNCTUATION"</span><span class="p">,</span><span class="w"> </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"！"</span><span class="p">}]],</span><span class="w">
  </span><span class="nl">"result_pos"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;ENTITY_person&gt;蔡英文&lt;/ENTITY_person&gt;&lt;ENTITY_noun&gt;總統&lt;/ENTITY_noun&gt;&lt;TIME_day&gt;明日&lt;/TIME_day&gt;&lt;ACTION_verb&gt;到&lt;/ACTION_verb&gt;&lt;LOCATION&gt;台北&lt;/LOCATION&gt;&lt;ENTITY_nouny&gt;市政府&lt;/ENTITY_nouny&gt;&lt;ACTION_verb&gt;找&lt;/ACTION_verb&gt;&lt;ENTITY_person&gt;柯文哲&lt;/ENTITY_person&gt;&lt;ACTION_verb&gt;開會&lt;/ACTION_verb&gt;&lt;ACTION_verb&gt;討論&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;他&lt;/ENTITY_pronoun&gt;&lt;FUNC_inner&gt;的&lt;/FUNC_inner&gt;&lt;ENTITY_nouny&gt;想法&lt;/ENTITY_nouny&gt;"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"&lt;ACTION_verb&gt;請&lt;/ACTION_verb&gt;&lt;ENTITY_pronoun&gt;你&lt;/ENTITY_pronoun&gt;&lt;ACTION_quantifiedVerb&gt;安排一下&lt;/ACTION_quantifiedVerb&gt;"</span><span class="p">,</span><span class="w">
                 </span><span class="s2">"！"</span><span class="p">],</span><span class="w">
  </span><span class="nl">"result_segmentation"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"蔡英文/總統/明日/到/台北/市政府/找/柯文哲/開會/討論/他/的/想法"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"，"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"請/你/安排一下"</span><span class="p">,</span><span class="w">
                          </span><span class="s2">"！"</span><span class="p">]}]</span><span class="w">
</span></code></pre></div><h3 id='49453b3d23'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>inputLIST</strong></td>
<td>str</td>
<td style="text-align: center"></td>
<td>Articut bulk_parse() 的結果。</td>
</tr>
</tbody></table>
<h2 id='7272c57ce6'>version</h2>
<p>列出目前使用的 Articut 版本。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">version</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">version</span><span class="p">()</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="nl">"info"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Articut Docker Pro only for Droidtown. Powered by Droidtown Linguist "</span><span class="w">
         </span><span class="s2">"Tech."</span><span class="p">,</span><span class="w">
 </span><span class="nl">"msg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success!"</span><span class="p">,</span><span class="w">
 </span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
 </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"v225"</span><span class="p">}</span><span class="w">
</span></code></pre></div><h2 id='7a736ec860'>getPersonLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的人名 (Person)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">personLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getPersonLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">212</span><span class="p">,</span><span class="w"> </span><span class="mi">215</span><span class="p">,</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">305</span><span class="p">,</span><span class="w"> </span><span class="mi">306</span><span class="p">,</span><span class="w"> </span><span class="s2">"他"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">44</span><span class="p">,</span><span class="w"> </span><span class="mi">45</span><span class="p">,</span><span class="w"> </span><span class="err">'你'</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='aad96f2e57'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>includePronounBOOL</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>指定為 True 時，將連代名詞 (Pronoun) 一併回傳；若指定為 False 時，則只回傳人名。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='6a4879c924'>getContentWordLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的實詞 (content word)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">contentWordLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getContentWordLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='7c37503e42'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='bcba9138c3'>getVerbStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的動詞 (verb)。
<aside class="notice">
此處指的是 ACTION_verb 標記的動詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你計劃過地球人類補完計劃"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">verbStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getVerbStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='706242f2b8'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='79266817be'>getNounStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的名詞 (noun)。
<aside class="notice">
此處指的是 ENTITY_noun、ENTITY_nouny、ENTITY_nounHead 或 ENTITY_oov 標記的名詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">nounStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getNounStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[]]</span><span class="w">
</span></code></pre></div><h3 id='f950d67060'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='fa17c13226'>getTimeLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的時間 (time)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"2018年7月26日"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">timeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getTimeLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">11</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="s2">"2018 年"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">40</span><span class="p">,</span><span class="w"> </span><span class="mi">42</span><span class="p">,</span><span class="w"> </span><span class="s2">"7月"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">65</span><span class="p">,</span><span class="w"> </span><span class="mi">68</span><span class="p">,</span><span class="w"> </span><span class="s2">"26日"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='37f3db8c69'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='48cd6f5486'>getLocationStemLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的地理位置 (location)。
<aside class="notice">
此處指的是地理位置標記的行政區地名詞彙，例如「台北」、「桃園」、「墨西哥」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"前天我從桃園到台北玩一整天"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">locationStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getLocationStemLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">93</span><span class="p">,</span><span class="w"> </span><span class="mi">95</span><span class="p">,</span><span class="w"> </span><span class="s2">"桃園"</span><span class="p">],</span><span class="w">
  </span><span class="p">[</span><span class="mi">144</span><span class="p">,</span><span class="w"> </span><span class="mi">146</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='34d7fd9748'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='4304a37e28'>getOpenDataPlaceLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的景點 (KNOWLEDGE_place) 標籤的字串。
<aside class="notice">
此處指的是景點 (KNOWLEDGE_place) 標記的非行政地點名稱詞彙，例如「鹿港老街」、「宜蘭運動公園」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我第一次來鹿港老街"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">openDataPlaceAccessBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">placeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getOpenDataPlaceLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">119</span><span class="p">,</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s2">"鹿港老街"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='1981074e93'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='5e77244622'>getQuestionLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (CLAUSE_Q) 標籤的句子。
<aside class="notice">
此處指的是<br />
    <code>&lt;CLAUSE_AnotAQ&gt;:</code> A-not-A 問句<br />
    <code>&lt;CLAUSE_YesNoQ&gt;:</code> 是非問句<br />
    <code>&lt;CLAUSE_WhoQ&quot;&gt;:</code> 「誰」問句<br />
    <code>&lt;CLAUSE_WhatQ&gt;:</code> 「物」問句<br />
    <code>&lt;CLAUSE_WhereQ&gt;:</code> 「何地」問句<br />
    <code>&lt;CLAUSE_WhenQ&gt;:</code> 「何時」問句<br />
    <code>&lt;CLAUSE_HowQ&gt;:</code> 「程度/過程」問句<br />
    <code>&lt;CLAUSE_WhyQ&gt;:</code> 「原因」問句<br />
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"你要不要吃餅乾"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">questionLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getQuestionLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="s2">"&lt;CLAUSE_AnotAQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"你要不要吃餅乾"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='6a31065b81'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='eefb8d374d'>getAddTWLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中含有 (KNOWLEDGE_addTW) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"地址：宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">addTWLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getAddTWLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[],</span><span class="w">
 </span><span class="p">[],</span><span class="w">
 </span><span class="p">[[</span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="mi">37</span><span class="p">,</span><span class="w"> </span><span class="s2">"宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='db0f90568a'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='b5f9831e9b'>getCurrencyLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的貨幣金額 (KNOWLEDGE_currency) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"我想知道300英鎊可以換多少美金"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">currencyResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getCurrencyLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">116</span><span class="p">,</span><span class="w"> </span><span class="s2">"300英鎊"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='61fc7306d4'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>greedyBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>指定為 True 時，將返回「貨幣名稱 + 數字」 (包含「&#39;」與「,」符號) 格式。</td>
</tr>
</tbody></table>
<h2 id='f2b60ccc17'>getWikiDataLIST</h2>
<p>取出 Articut 斷詞與詞性標記結果中的 WikiData 標記文字。<aside class="notice">
此處指的是 KNOWLEDGE_wikiData 標記的條目名稱。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputSTR</span> <span class="o">=</span> <span class="s">"什麼是黏體動物"</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">wikiDataLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getWikiDataLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[</span><span class="mi">63</span><span class="p">,</span><span class="w"> </span><span class="mi">67</span><span class="p">,</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">]]]</span><span class="w">
</span></code></pre></div><h3 id='e97e32ba87'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultDICT</strong></td>
<td>dict</td>
<td style="text-align: center"></td>
<td>Articut 斷詞與詞性標記結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='fb093f1233'>bulk_getPersonLIST</h2>
<p>取出 bulk_parse() 結果中的人名 (Person)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">personLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getPersonLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">16</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="s2">"你"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="s2">"蔡英文"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="err">(</span><span class="mi">212</span><span class="p">,</span><span class="w"> </span><span class="mi">215</span><span class="p">,</span><span class="w"> </span><span class="s2">"柯文哲"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">305</span><span class="p">,</span><span class="w"> </span><span class="mi">306</span><span class="p">,</span><span class="w"> </span><span class="s2">"他"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">44</span><span class="p">,</span><span class="w"> </span><span class="mi">45</span><span class="p">,</span><span class="w"> </span><span class="s2">"你"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='9f5eca4ccd'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>includePronounBOOL</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>指定為 True 時，將連代名詞 (Pronoun) 一併回傳；若指定為 False 時，則只回傳人名。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='d5a3f0c300'>bulk_getContentWordLIST</h2>
<p>取出 bulk_parse() 結果中的實詞 (content word)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">contentWordLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getContentWordLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">88</span><span class="p">,</span><span class="w"> </span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">138</span><span class="p">,</span><span class="w"> </span><span class="mi">140</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='d1fcc90ba0'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='448d3b7d50'>bulk_getVerbStemLIST</h2>
<p>取出 bulk_parse() 結果中的動詞 (verb)。
<aside class="notice">
此處指的是 ACTION_verb 標記的動詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">verbStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getVerbStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">41</span><span class="p">,</span><span class="w"> </span><span class="mi">43</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">112</span><span class="p">,</span><span class="w"> </span><span class="s2">"補"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">99</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="s2">"到"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">182</span><span class="p">,</span><span class="w"> </span><span class="mi">183</span><span class="p">,</span><span class="w"> </span><span class="s2">"找"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">244</span><span class="p">,</span><span class="w"> </span><span class="mi">246</span><span class="p">,</span><span class="w"> </span><span class="s2">"開會"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">273</span><span class="p">,</span><span class="w"> </span><span class="mi">275</span><span class="p">,</span><span class="w"> </span><span class="s2">"討論"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">13</span><span class="p">,</span><span class="w"> </span><span class="mi">14</span><span class="p">,</span><span class="w"> </span><span class="s2">"請"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='a14963a91e'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='47c3aa3c86'>bulk_getNounStemLIST</h2>
<p>取出 bulk_parse() 結果中的名詞 (noun)。
<aside class="notice">
此處指的是 ENTITY_noun、ENTITY_nouny、ENTITY_nounHead 或 ENTITY_oov 標記的名詞詞彙。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">nounStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getNounStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">88</span><span class="p">,</span><span class="w"> </span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="s2">"人類"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">138</span><span class="p">,</span><span class="w"> </span><span class="mi">140</span><span class="p">,</span><span class="w"> </span><span class="s2">"計劃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">47</span><span class="p">,</span><span class="w"> </span><span class="mi">49</span><span class="p">,</span><span class="w"> </span><span class="s2">"總統"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">151</span><span class="p">,</span><span class="w"> </span><span class="mi">154</span><span class="p">,</span><span class="w"> </span><span class="s2">"市政府"</span><span class="p">],</span><span class="w">
   </span><span class="p">[</span><span class="mi">363</span><span class="p">,</span><span class="w"> </span><span class="mi">365</span><span class="p">,</span><span class="w"> </span><span class="s2">"想法"</span><span class="p">]],</span><span class="w">
   </span><span class="p">[],</span><span class="w">
   </span><span class="p">[],</span><span class="w">
   </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='3902593402'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='04a94d1419'>bulk_getTimeLIST</h2>
<p>取出 bulk_parse() 結果中的時間 (time)。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">timeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getTimeLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">73</span><span class="p">,</span><span class="w"> </span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="s2">"明日"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='7c0ff83a9e'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='ac41c6fd16'>bulk_getLocationStemLIST</h2>
<p>取出 bulk_parse() 結果中的地理位置 (location)。
<aside class="notice">
此處指的是地理位置標記的行政區地名詞彙，例如「台北」、「桃園」、「墨西哥」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">locationStemLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span> <span class="n">bulk_getLocationStemLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">62</span><span class="p">,</span><span class="w"> </span><span class="mi">64</span><span class="p">,</span><span class="w"> </span><span class="s2">"地球"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">124</span><span class="p">,</span><span class="w"> </span><span class="mi">126</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北"</span><span class="p">]],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]]]</span><span class="w">
</span></code></pre></div><h3 id='e0d6d5cf44'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='192ac68b92'>bulk_getOpenDataPlaceLIST</h2>
<p>取出 bulk_parse() 結果中的景點 (KNOWLEDGE_place) 標籤的字串。
<aside class="notice">
此處指的是景點 (KNOWLEDGE_place) 標記的非行政地點名稱詞彙，例如「鹿港老街」、「宜蘭運動公園」。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你計劃過地球人類補完計劃"</span><span class="p">,</span>
    <span class="s">"蔡英文總統明日到台北市政府找柯文哲開會討論他的想法，請你安排一下！"</span><span class="p">,</span>
    <span class="s">"我第一次來鹿港老街"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">openDataPlaceBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">placeLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getOpenDataPlaceLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[]],</span><span class="w">
 </span><span class="p">[[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">119</span><span class="p">,</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s2">"鹿港老街"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='6eb748a43f'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='71c4451e88'>bulk_getQuestionLIST</h2>
<p>取出 bulk_parse() 結果中含有 (CLAUSE_Q) 標籤的句子。
<aside class="notice">
此處指的是<br />
    <code>&lt;CLAUSE_AnotAQ&gt;:</code> A-not-A 問句<br />
    <code>&lt;CLAUSE_YesNoQ&gt;:</code> 是非問句<br />
    <code>&lt;CLAUSE_WhoQ&quot;&gt;:</code> 「誰」問句<br />
    <code>&lt;CLAUSE_WhatQ&gt;:</code> 「物」問句<br />
    <code>&lt;CLAUSE_WhereQ&gt;:</code> 「何地」問句<br />
    <code>&lt;CLAUSE_WhenQ&gt;:</code> 「何時」問句<br />
    <code>&lt;CLAUSE_HowQ&gt;:</code> 「程度/過程」問句<br />
    <code>&lt;CLAUSE_WhyQ&gt;:</code> 「原因」問句<br />
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"你到底要不要吃"</span><span class="p">,</span>
    <span class="s">"明天要去哪裡玩呢"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">questionLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getQuestionLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="s2">"&lt;CLAUSE_AnotAQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"你到底要不要吃"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="s2">"&lt;CLAUSE_WhereQ&gt;"</span><span class="p">,</span><span class="w"> </span><span class="s2">"明天要去哪裡玩呢"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='9339ca6e19'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='2ff73a2e60'>bulk_getAddTWLIST</h2>
<p>取出 bulk_parse() 結果中含有 (KNOWLEDGE_addTW) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"地址：宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">,</span>
    <span class="s">"我們去台北市信義區信義路五段7號"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">addTWLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getAddTWLIST</span><span class="p">(</span><span class="n">resultLIST</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[],</span><span class="w">
  </span><span class="p">[],</span><span class="w">
  </span><span class="p">[[</span><span class="mi">17</span><span class="p">,</span><span class="w"> </span><span class="mi">37</span><span class="p">,</span><span class="w"> </span><span class="s2">"宜蘭縣宜蘭市縣政北七路六段55巷1號2樓"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">80</span><span class="p">,</span><span class="w"> </span><span class="mi">93</span><span class="p">,</span><span class="w"> </span><span class="s2">"台北市信義區信義路五段7號"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='36e58c3911'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>
<h2 id='d93fb5759c'>bulk_getCurrencyLIST</h2>
<p>取出 bulk_parse() 結果中的貨幣金額 (KNOWLEDGE_currency) 標籤的字串。</p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"我想知道300英鎊可以換多少美金"</span><span class="p">,</span>
    <span class="s">"1萬美金等於多少台幣呢"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">currencyResult</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_getCurrencyLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">111</span><span class="p">,</span><span class="w"> </span><span class="mi">116</span><span class="p">,</span><span class="w"> </span><span class="s2">"300英鎊"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">24</span><span class="p">,</span><span class="w"> </span><span class="s2">"1萬美金"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='933d738370'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
<tr>
<td>greedyBOOL</td>
<td>bool</td>
<td style="text-align: center">False</td>
<td>指定為 True 時，將返回「貨幣名稱 + 數字」 (包含「&#39;」與「,」符號) 格式。</td>
</tr>
</tbody></table>
<h2 id='e67438d6a5'>bulk_getWikiDataLIST</h2>
<p>取出 bulk_parse() 結果中的 WikiData 標記文字。<aside class="notice">
此處指的是 KNOWLEDGE_wikiData 標記的條目名稱。
</aside></p>

<blockquote>
<p>範例：</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="n">inputLIST</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">"什麼是黏體動物"</span><span class="p">,</span>
    <span class="s">"陽明山上開滿了海芋"</span>
<span class="p">]</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">bulk_parse</span><span class="p">(</span><span class="n">inputSTR</span><span class="p">,</span> <span class="n">wikiDataBOOL</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">resultLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">mergeBulkResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">wikiDataLIST</span> <span class="o">=</span> <span class="n">articut</span><span class="p">.</span><span class="n">getWikiDataLIST</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>結果：</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">[[[[</span><span class="mi">63</span><span class="p">,</span><span class="w"> </span><span class="mi">67</span><span class="p">,</span><span class="w"> </span><span class="s2">"黏體動物"</span><span class="p">]]],</span><span class="w">
 </span><span class="p">[[[</span><span class="mi">96</span><span class="p">,</span><span class="w"> </span><span class="mi">98</span><span class="p">,</span><span class="w"> </span><span class="s2">"海芋"</span><span class="p">]]]]</span><span class="w">
</span></code></pre></div><h3 id='c29a056089'>參數說明</h3>
<table><thead>
<tr>
<th>參數</th>
<th>型態</th>
<th style="text-align: center">預設</th>
<th>功能</th>
</tr>
</thead><tbody>
<tr>
<td><strong>parseResultLIST</strong></td>
<td>list</td>
<td style="text-align: center"></td>
<td>mergeBulkResult() 的結果。</td>
</tr>
<tr>
<td>indexWithPOS</td>
<td>bool</td>
<td style="text-align: center">True</td>
<td>返回的 index 位置中是否包含 POS 內容。</td>
</tr>
</tbody></table>

      </div>
      <div class="dark-box">
          <div class="lang-selector">
                <a href="#" data-language-name="python">Python</a>
          </div>
      </div>
    </div>
  </body>
</html>
